package com.jiai.cloud.feign;

import com.jiai.cloud.entity.TGoods;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;



@FeignClient("authentication")
public interface GoodsAPI {

     //增
    @RequestMapping(value="/api/v1/goods/addGoods")
    Object addGoods(@RequestBody TGoods tGoods);

    //删
    @RequestMapping(value="/api/v1/goods/delete/{id}")
    Object delete(@PathVariable("id") Integer id);

    //查
    @RequestMapping("/api/v1/goods/findById/{id}")
    Object selectById(@PathVariable("id") Integer id);

    @RequestMapping(value = "/api/v1/goods/findByAll/{page}",method= RequestMethod.POST)
    Object selectPage(@PathVariable("page") Integer page);

    //改(有就改，没有就插入)
    @RequestMapping(value="/api/v1/goods/edit")
    Object insertOrUpdate(@RequestBody TGoods tGoods);


}
